﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Asxsyd92Core.Utils.Data
{
    public interface IRepository<T> where T : new()
    {
        T Get(Guid id);
        IEnumerable<T> GetAll();
        int Insert(T o);
        int Update(T o);
        int UpdateWhatWhere(object what, object where);
        int InsertNoIdentity(T o);
        IEnumerable<T> GetPage(long page, long pageSize, string sort);
        IEnumerable<T> GetPage(long page, long pageSize, string sort, object where);
        long Count();
        IPageable<T> GetPageable(long page, long pageSize);
        IEnumerable<T> GetWhere(object where);
        int Delete(Guid id);
        int CountWhere(object where);
        IEnumerable<object> GetNoMoldeWhere(string table, string where);

        IEnumerable<object> GetNoMoldeList(string sql);

    }
}
